home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #14 / Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO / pcboard / msgtag11.zip / MORE.PPS < prev    next >
Text File  |  1996-01-30  |  21KB  |  678 lines

  1. ;
  2. ; FLAG.PPE Original source written by David W. Terry
  3. ; NOTE:  Please DO NOT DISTRIBUTE modified source code without prior permission
  4. ; or without meeting the requirements set forth in FLAG.DOC.
  5. ;
  6. ;──────────────────────────────────────────────────────────────────────────────
  7. ;  MORE.PPE - Written by Dan Shore - SysOp
  8. ;                        The Shoreline BBS
  9. ;
  10. ;  Modified FLAG.PPE by Dan Shore - July 2, 1995 to work with the
  11. ;  msg tagging PPE's (QSCAN, MORE, MEC, READ, KILL, RECOVER)
  12. ;
  13. ;  MORE.PPE meets the requirments for modification and re-distribution as
  14. ;  set forth in the requirements in the "original" FLAG.DOC from FLAG32.ZIP.
  15. ;
  16. ;  Purpose:  Replacement of the More Prompt for use with the msg
  17. ;            tagging PPE's (QSCAN, READ, KILL, RECOVER, MORE, MEC)
  18. ;
  19. ;──────────────────────────────────────────────────────────────────────────────
  20. ;
  21. ;  Last Revised:  11-2-95
  22. ;  Revised by  :  Dan Shore
  23. ;  Revision    :  Removed total_msgs_tagged variable
  24. ;
  25. ;──────────────────────────────────────────────────────────────────────────────
  26. ;
  27. ;  To install:
  28. ;
  29. ;    1) Edit your PCBText file and change the following entry:
  30. ;
  31. ;       MKPCBTXT PCBTEXT /I:196 "!C:\PCB\PPE\QSCAN\MORE.PPE"
  32. ;
  33. ;       Note: You may have to change the pathname to the PPE.
  34. ;
  35. ;──────────────────────────────────────────────────────────────────────────────
  36. ;
  37. ;  Items to be completed yet with Message Tagging:
  38. ;
  39. ;  1.  RIP Support
  40. ;  2.  Support for 50 line mode
  41. ;  3.  Support for more than 20 stacked message numbers for reading.
  42. ;      20 message number stacking is a limitation of PCB, so at this
  43. ;      time we elected to keep the PPE within PCB limitations and add
  44. ;      additional flexibility/features later on.
  45. ;
  46. ;──────────────────────────────────────────────────────────────────────────────
  47. ;
  48. ;
  49. ; check to see if caller has ANSI capabilities and, if not, display the old
  50. ; prompt and exit - let PCBoard handle the input.
  51. ;
  52.  
  53. IF (!ANSION()) THEN
  54.   DISPFILE PPEPATH()+"TAGOLD",LANG
  55.   END
  56. ENDIF
  57.  
  58.  
  59. BOOLEAN exitflag          ' Flag to determine when we should exit
  60. BOOLEAN rip               ' Flag to indicate RIPscrip is in use
  61. BOOLEAN end_of_screen     ' Flag to indicate end of screen
  62. BOOLEAN going_up          ' Flag to indicate we are going up the screen
  63. BOOLEAN found_dupe        ' Flag for duplicate tagged msg checking
  64. BOOLEAN max_tagged        ' Flag to indicate maximum tagged messages reached
  65.  
  66. STRING  text              ' The text that the caller types
  67. STRING  key               ' Keystroke text
  68. STRING  prev_key          ' Save previous key
  69. STRING  hold              ' garbage variable
  70. STRING  page_length_file  ' file where users original page length is stored
  71.  
  72. STRING  BS                ' An ASCII backspace character
  73. STRING  BS2               ' An ASCII backspace character
  74. STRING  CR                ' An ASCII carriage return character
  75. STRING  ESC               ' An ASCII esc character
  76. STRING  tag_msg           ' Variable for determining if msg has been tagged
  77. STRING  tag_msg_file      ' Disk file tagged messages are written to
  78. STRING  sema_path         ' Path to the semaphore file
  79. STRING  filename          ' The name of the file that is being processed
  80. STRING  fileimage         ' Includes the color codes for restoration of text
  81.  
  82. BIGSTR  tag_msg_list      ' Contains tagged message numbers seperated by
  83.                           ' semi-colon.  This will then be written to
  84.                           ' the disk file for reading by KILL.PPE, RECOVER.PPE,
  85.                           ' READ.PPE and QSCAN.PPE
  86. BIGSTR  hold2             ' garbage variable
  87.  
  88. BYTE    len               ' Length of the text the caller has typed
  89. BYTE    oldy              ' Last row position of cursor
  90. BYTE    newy              ' New row position of cursor
  91. BYTE    topy              ' top position of msg numbers
  92. BYTE    x                 ' garbage variable
  93. BYTE    int_temp          ' Generic byte variable
  94. ;──────────────────────────────────────────────────────────────────────────────
  95.  
  96.  
  97. hold = READLINE(PCBDAT(),204)
  98. hold = FILEINF(hold,6) + ":" + FILEINF(hold,7)
  99.  
  100. sema_path = hold + "msgtag.use"
  101. tag_msg_file = hold + "mtg" + STRING(CURCONF()) + ".lst"
  102. page_length_file = hold + "userpl.dat"
  103.  
  104.  
  105. '
  106. '  See if the disk file exists.  If not show the "standard"
  107. '  more prompt and exit
  108. '
  109. '  If the file does exist, get the tagged msg information from it and
  110. '  place the information into tag_msg_list variable
  111. '
  112.  
  113. IF (!EXIST(sema_path)) THEN
  114.   DISPFILE PPEPATH() + "tagold", LANG+GRAPH
  115.   END
  116. ELSE
  117.   IF (FILEINF(tag_msg_file,4) > 0) THEN
  118.     FOPEN 1, tag_msg_file, O_RD, S_DN
  119.     FREAD 1, tag_msg_list, FILEINF(tag_msg_file,4)
  120.     FCLOSE 1
  121.   END IF
  122. END IF
  123.  
  124. ; Initializations
  125.  
  126. BS     = CHR(8)     ' Backspace Key
  127. BS2    = CHR(127)   ' Alternate Backspace Key
  128. CR     = CHR(13)    ' Carriage Return
  129. ESC    = CHR(27)    ' ESC character
  130. x      = 1          ' Initialize screen line counter
  131.  
  132. '
  133. '  set the first 50 message numbers (lines on display) to not being tagged
  134. '
  135. tag_msg = "00000000000000000000000000000000000000000000000000"
  136.  
  137. ;***********************************************************************
  138.  
  139. ; Main Program
  140.  
  141. CLREOL                       ' clear the line for input
  142. GOSUB displayprompt          ' display the new prompt
  143.  
  144. ' While the user hasn't exited, get keystrokes and act on them.
  145. ' Exiting will occur when the caller presses ENTER.
  146.  
  147. WHILE (!exitflag) DO
  148.  
  149.   key = INKEY()  ' Get a keypress from the user
  150.  
  151.   if (key <> "") THEN  ' If the user pressed a key, then let's process it
  152.  
  153.     ' If it is the FIRST keystroke, signified by the buffer having 0 bytes
  154.     ' in it, then check to see if it is a SPACE.  If so, then we'll go into
  155.     ' MARK mode.  If not, then we'll process the keystrokes the same way that
  156.     ' PCBoard would .. gathering them up into a buffer.  Once the ENTER key
  157.     ' is pressed, we'll exit out and stuff PCBoard's keyboard buffer with the
  158.     ' keystrokes that were collected.
  159.  
  160.     IF (len = 0 && (key = " " || LEFT(key,2) = "UP" || LEFT(key,4) = "DOWN")) THEN
  161.  
  162.       '
  163.       '  Get the row we are curently in
  164.       '
  165.       oldy = GETY()
  166.  
  167.       '
  168.       '  Read the screen buffer to get the first line where a
  169.       '  msg number appears
  170.       '
  171.       WHILE (1) DO
  172.         hold = SCRTEXT(1,x,5,FALSE)
  173.         IF (INSTR(hold,"Msg#") > 0) THEN
  174.           INC x
  175.           BREAK
  176.         ELSE IF (S2I(MID(hold,2,4),10) > 0) THEN
  177.           BREAK
  178.         ELSE
  179.           INC x
  180.           IF (x > 25) BREAK
  181.         END IF
  182.       END WHILE
  183.       newy = x
  184.       topy = x
  185.  
  186.       IF (LEFT(key,2) = "UP") THEN
  187.         going_up = TRUE
  188.         newy = GETY() - 1
  189.       ELSE IF (key = " " || LEFT(key,4) = "DOWN") THEN
  190.         key = "DOWN"
  191.         going_up = FALSE
  192.       END IF
  193.  
  194.       ANSIPOS 1, oldy
  195.       PRINT CR
  196.       CLREOL
  197.       PRINT ESC+"[s"  ' save the current cursor position
  198.  
  199.       ' Let the caller know what he can do while in MARK mode
  200.       DISPFILE PPEPATH()+"TAGBAR",GRAPH+LANG
  201.  
  202.       ' Move the cursor back to the first column
  203.       PRINT CR
  204.  
  205.       ' Find the first msg number on the screen.
  206.       GOSUB findfile
  207.  
  208.       '
  209.       ' If a msg num was found, then findfile highlighted it.  Now wait for
  210.       ' another keystroke to see if the user whats to mark this one, or move
  211.       ' on to another one, or exit out.  Marking is done by pressing ENTER,
  212.       ' moving to another file is done by pressing SPACE, UP or DOWN arrow,
  213.       ' and exiting is done by pressing ESC.
  214.       '
  215.       IF (filename <> "") THEN
  216.         WHILE (1) DO
  217.           key = INKEY()
  218.           IF (key = ESC) BREAK
  219.           IF (key = CR) THEN
  220.             GOSUB unhighlight
  221.             GOSUB highlight
  222.             IF (going_up) THEN
  223.               INC newy
  224.               key = "UP"
  225.             ELSE
  226.               DEC newy
  227.               key = "DOWN"
  228.             END IF
  229.             GOSUB findfile
  230.  
  231.           ELSEIF (key = " " || LEFT(key,4) = "DOWN" || LEFT(key,2) = "UP") THEN
  232.  
  233.           ' If the key pressed was a SPACE, UP or Down then the user
  234.           ' has decided to skip
  235.           ' over that msg.  So unhighlight it, then try to find another
  236.           ' msg.  If a msg is found, we'll stay in this loop.  If one is
  237.           ' not found, then we'll restore the original prompt and go back to
  238.           ' waiting for keystrokes in case the caller wants to start over
  239.  
  240.             IF (key = " ") key = "DOWN"
  241.             IF (prev_key = "DOWN" && LEFT(key,2) = "UP") THEN
  242.               newy = newy - 2
  243.             ELSEIF (prev_key = "UP" && LEFT(key,4) = "DOWN") THEN
  244.               newy = newy + 2
  245.             END IF
  246.             GOSUB unhighlight
  247.             GOSUB findfile
  248.             IF (end_of_screen) THEN
  249.               GOSUB restorecursor
  250.               GOSUB displayprompt
  251.               end_of_screen = FALSE
  252.               GOTO bottom
  253.             ENDIF
  254.           ELSE            ' addition per David Terry msg
  255.             DELAY 3       ' addition per David Terry msg
  256.           ENDIF
  257.         ENDWHILE
  258.  
  259.         ' If we've gotten this far, then ESC was pressed.  We'll
  260.         ' unhighlight the msg, restore the prompt and then, if CR was pressed,
  261.         ' meaning the user wished to flag that msg
  262.  
  263.         GOSUB unhighlight
  264.         GOSUB restorecursor
  265.  
  266.       ELSE
  267.         GOSUB restorecursor
  268.       ENDIF
  269.  
  270.       GOSUB displayprompt
  271.       CONTINUE
  272.  
  273.     ELSEIF (key == BS | key == BS2) THEN
  274.  
  275.       ' If the caller pressed backspace or delete, then delete the character
  276.       ' to the left, and remove it from the input buffer.  Of course, if the
  277.       ' caller hasn't typed anything yet, or if the caller has already
  278.       ' backspaced everything out, signified by the len being 0 (meaning there
  279.       ' are 0 bytes in the buffer), then we'll just loop back around waiting
  280.       ' for more keystrokes
  281.  
  282.       IF (len > 0) THEN
  283.         PRINT BS+" "
  284.         len  = len - 1
  285.         text = LEFT(text,len)
  286.       ELSE
  287.         CONTINUE
  288.       ENDIF
  289.  
  290.     ELSEIF (key = CR) THEN
  291.       '
  292.       ' If it's a carriage return then set the flag to exit
  293.       '
  294.       exitflag = TRUE
  295.       '
  296.     ELSEIF (LEN(key) > 1 | key < " ") THEN
  297.  
  298.       ' Special keys, such as UP, DOWN, etc, return multi-letter values such
  299.       ' as "UP" and "DOWN" when the INKEY() function is called.  Since we just
  300.       ' want to ignore special characters, we'll use the CONTINUE statement to
  301.       ' jump back to the top of the loop
  302.       '
  303.       ' We also want to avoid displaying "control characters" so anything
  304.       ' less than a SPACE should also be skipped.
  305.  
  306.       CONTINUE
  307.  
  308.     ELSEIF ((len = 0) & ((key = "?") | (UPPER(key) = "H"))) THEN
  309.  
  310.       ' If the user typed "?" or "H" then we want to display a help file.
  311.       ' First we'll save the current screen, then display the help file, and
  312.       ' then restore the saved screen after the caller has read the help file.
  313.  
  314.       SAVESCRN
  315.       NEWLINE
  316.       DISPFILE PPEPATH()+"TAGHLP",GRAPH+LANG
  317.       NEWLINE
  318.       WAIT
  319.       RESTSCRN
  320.       CONTINUE
  321.  
  322.     ELSEIF ((key >= " ") & (len < 80)) THEN
  323.  
  324.       ' Here we are just gathering up keystrokes and putting them into an
  325.       ' input buffer.  As long as the keystrokes are greater than or equal to
  326.       ' a SPACE we'll just add them in until a limit of 80 characters is
  327.       ' reached.  PCBoard won't let you type more than 80 characters at that
  328.       ' prompt anyway so we might as well keep the same limit.
  329.  
  330.       text = text + key
  331.       len  = len + 1
  332.  
  333.     ENDIF
  334.  
  335.     PRINT key    ' Print any keystrokes the caller types
  336.   ELSE           ' addition per David Terry msg
  337.     DELAY 3      ' addition per David Terry msg
  338.   ENDIF
  339.  
  340. :bottom
  341. ENDWHILE
  342.  
  343. ' If we've gotten this far, then the caller has pressed ENTER so we'll stuff
  344. ' whatever the caller has typed into PCBoard's input buffer and let PCBoard
  345. ' process the request.
  346. '
  347. text = RTRIM(text," ")
  348.  
  349. '
  350. ' Move cursor back to left margin and clear the line in case the user
  351. ' has decided to flag files the old fashion way - "...they earn it..."
  352. ' no that isn't it!! - too much T.V. :) - if they use the FLAG command
  353. ' instead of the space bar or cursor arrow keys, remains of the previous
  354. ' prompt will remain if not cleared
  355. '
  356. PRINT CR
  357. CLREOL
  358. KBDSTUFF text+CR
  359.  
  360. IF (key = CR) CLS
  361.  
  362. '
  363. '  Delete the semaphore file if the user quit "N" the quick scan listing
  364. '  and also restore the users ORIGINAL page length settings
  365. '
  366. IF (INSTR(UPPER(text), "N") || INSTR(UPPER(text), "NS") || INSTR(UPPER(text), "A")) THEN
  367.   IF (EXIST(page_length_file)) THEN
  368.     GETUSER
  369.     FOPEN 7, page_length_file, O_RD, S_DN
  370.     FGET 7, hold
  371.     U_PAGELEN = TOINT(hold)
  372.     FCLOSE 7
  373.     PUTUSER
  374.     DELETE page_length_file
  375.   END IF
  376.   IF (FILEINF(tag_msg_file,4) = 0) DELETE tag_msg_file
  377.   DELETE sema_path
  378. END IF
  379.  
  380. '
  381. '  If we have tagged files, write them to the disk file
  382. '
  383. IF (tag_msg_file != "" && LEN(tag_msg_list) > 0) THEN
  384.   FOPEN 1, tag_msg_file, O_WR, S_DN
  385.   FWRITE 1, tag_msg_list, LEN(tag_msg_list)
  386.   FCLOSE 1
  387. END IF
  388.  
  389. END
  390.  
  391. ;***********************************************************************
  392. '
  393. ' This subroutine restores the cursor position.  It does this using an ANSI
  394. ' command that simply restores a previously saved cursor position.  In
  395. ' addition, we'll clear the line before returning.
  396.  
  397. :restorecursor
  398. PRINT ESC+"[u"
  399. CLREOL
  400. RETURN
  401.  
  402.  
  403. ;***********************************************************************
  404. '
  405. ' This is a subroutine that displays the new prompt and then sets the color to
  406. ' the default for input.
  407.  
  408. :displayprompt
  409. DISPFILE PPEPATH()+"TAGNEW",LANG
  410. DEFCOLOR
  411. RETURN
  412.  
  413.  
  414. ;***********************************************************************
  415. '
  416. ' This is a subroutine that checks the filenames() array to locate the next
  417. ' file on screen.  If RIPscrip is used, then special commands (which are
  418. ' passed via a mouse-click from the caller's terminal, are used to identify
  419. ' which file is desired.
  420. '
  421. ' If a valid filename is found, it is stored in a variable called filename.
  422. ' Also, it calls another subroutine to highlight the filename on the screen.
  423.  
  424. :findfile
  425. '
  426. ' ***********************************************************
  427. ' RIP support not implemented yet!!!!! - Any Volunteers?????
  428. ' ***********************************************************
  429. '
  430. 'IF (rip) THEN
  431. '  newy = 0
  432. '  key = ""
  433. '  WHILE (newy = 0) DO
  434. '    key = INKEY()      ' watch for the next character
  435. '    newy = ASC(key)
  436. '    IF (newy >= 129 & newy <= 151) THEN
  437. '      newy = newy - 128
  438. '      IF (filenames(newy) <> "") THEN
  439. '        GOSUB highlight
  440. '        filename = filenames(newy)
  441. '        RETURN
  442. '      ELSE
  443. '        newy = 0
  444. '      ENDIF
  445. '    ELSE        '  addition per David Terry msg
  446. '      DELAY 3   '  addition per David Terry msg
  447. '    ENDIF
  448. '  ENDWHILE
  449. 'ELSE
  450.  
  451.    IF (LEFT(key,4) = "DOWN") THEN
  452.      IF (newy < oldy) THEN
  453.        going_up = FALSE
  454.        prev_key = "DOWN"
  455.        filename = SCRTEXT(1,newy,8,FALSE)
  456.        GOSUB highlight
  457.        INC newy
  458.        RETURN
  459.      ELSE
  460.        end_of_screen = TRUE
  461.        RETURN
  462.      ENDIF
  463.    END IF
  464.    IF (LEFT (key,2) = "UP") THEN
  465.      IF (newy > topy-1) THEN
  466.        prev_key = "UP"
  467.        going_up = TRUE
  468.        filename = SCRTEXT(1,newy,8,FALSE)
  469.        GOSUB highlight
  470.        DEC newy
  471.        RETURN
  472.      ELSE
  473.        end_of_screen = TRUE
  474.        RETURN
  475.      ENDIF
  476.    END IF
  477.  
  478. 'ENDIF
  479.  
  480.  
  481. ' no valid msg num was found, return with an empty msg num
  482. filename = ""
  483. RETURN
  484.  
  485.  
  486. ;***********************************************************************
  487. '
  488. ' This is a subroutine that highlights the msg num moving the cursor to the
  489. ' correct line and then changing the color to black on white and printing the
  490. ' msg num.  Prior to highlighting the msg num, it saves a color image of the
  491. ' msg num so that, when it comes time to unhighlight the file, the image can
  492. ' be restored.
  493.  
  494. :highlight
  495. '
  496. ' move the cursor back to where it started, at the bottom, and then move
  497. ' it up to the appropriate line on the screen.
  498. '
  499. IF (key = CR) THEN
  500.  
  501.   IF (going_up) THEN
  502.     PRINT ESC+"[u"+ESC+"["+STRING(oldy-newy-1)+"A"
  503.     int_temp = newy + 1
  504.   ELSE
  505.     PRINT ESC+"[u"+ESC+"["+STRING(oldy-newy+1)+"A"
  506.     int_temp = newy - 1
  507.   END IF
  508.  
  509.   '
  510.   '  Check to see if the msg number is already marked
  511.   '
  512.   IF (MID(tag_msg,int_temp,1) = "1") THEN
  513.     filename = MID(filename,1,7) + " "
  514.     tag_msg = MID(tag_msg,1,int_temp-1) + "0" + MID(tag_msg,int_temp+1,50-int_temp)
  515.     GOSUB REMOVE_TAG
  516.   ELSE
  517.  
  518.     '
  519.     ' Check for duplicate msg number tagged
  520.     '
  521.     GOSUB CHECK_DUPE_TAG
  522.     IF (found_dupe) RETURN
  523.  
  524.     '
  525.     '  msg number gets added in this routine, if we have not exceeded
  526.     '  the maximum number of msgs allowed to mark
  527.     '
  528.     GOSUB CHECK_MAX_TAG
  529.     IF (max_tagged) RETURN
  530.  
  531.     '
  532.     '  Print msg number again with an "*" to the right to show it is tagged
  533.     '
  534.     filename = MID(filename,1,7) + "*"
  535.  
  536.     '
  537.     '  change tag_msg to show the msg is now tagged
  538.     '
  539.     tag_msg = MID(tag_msg,1,int_temp-1) + "1" + MID(tag_msg,int_temp+1,50-int_temp)
  540.   END IF
  541. ELSE
  542.   PRINT ESC+"[u"+ESC+"["+STRING(oldy-newy)+"A"
  543.   COLOR @X70
  544. END IF
  545.  
  546. ' get the file image (text & attributes) for later restoration
  547. fileimage = SCRTEXT(1,newy,8,TRUE)
  548.  
  549. ' print the message number
  550. PRINT filename + CR
  551. RETURN
  552.  
  553. ;***********************************************************************
  554. '
  555. ' This is a subroutine that unhighlights the msg num by printing the file
  556. ' image, which includes color codes as well as the msg num.
  557.  
  558. :unhighlight
  559. PRINT fileimage+CR
  560. RETURN
  561.  
  562.  
  563. '
  564. '  Removes a tagged msg from list and rebuilds the list
  565. '
  566. :REMOVE_TAG
  567.  
  568.  
  569.   hold = RTRIM(MID(filename,2,7)," ")
  570.   hold2 = MID(tag_msg_list,1,INSTR(tag_msg_list,hold)-1)
  571.   '
  572.   '  If msg number to remove is the first number
  573.   '
  574.   IF (hold2 = "") THEN
  575.     int_temp = INSTR(tag_msg_list,";")+1
  576.     IF (int_temp >= LEN(tag_msg_list)) THEN
  577.       tag_msg_list = ""
  578.     ELSE
  579.       hold2 = hold2 + MID(tag_msg_list,int_temp,LEN(tag_msg_list)-int_temp+1)
  580.     END IF
  581.   ELSE
  582.     x = LEN(hold2)+LEN(hold)+2
  583.     IF (x < LEN(tag_msg_list)) hold2 = hold2 + MID(tag_msg_list, x, LEN(tag_msg_list)-INSTR(tag_msg_list,hold)+1)
  584.   END IF
  585.   tag_msg_list = hold2
  586.   RETURN
  587.  
  588. '
  589. '  Check to see if the msg number has already been tagged
  590. '
  591. :CHECK_DUPE_TAG
  592.  
  593.    found_dupe = FALSE
  594.    IF (INSTR(tag_msg_list,RTRIM(MID(filename,2,6)," ")) != 0) THEN
  595.      IF (going_up) THEN
  596.        hold = SCRTEXT(1,newy+1,78,TRUE)
  597.      ELSE
  598.        hold = SCRTEXT(1,newy-1,78,TRUE)
  599.      END IF
  600.      CLREOL
  601.      PRINT "@X0CDuplicate Message Number...@X0FRequest ignored@X07"
  602.      DELAY 54
  603.      PRINT CR
  604.      CLREOL
  605.      PRINT hold
  606.      found_dupe = TRUE
  607.    END IF
  608.    RETURN
  609.  
  610. '
  611. '  Check to see if we have reached our tagged msg limit.  This limit
  612. '  is due to the STRING variable tag_msg_list having a max of 256 chars.
  613. '
  614. :CHECK_MAX_TAG
  615.  
  616.    max_tagged = FALSE
  617.    IF (LEN(tag_msg_list) + LEN(TRIM(MID(filename,2,6)," ")) < 2047) THEN
  618.      tag_msg_list = tag_msg_list + TRIM(MID(filename,2,6)," ") + ";"
  619.    ELSE
  620.      IF (going_up) THEN
  621.        hold = SCRTEXT(1,newy+1,78,TRUE)
  622.      ELSE
  623.        hold = SCRTEXT(1,newy-1,78,TRUE)
  624.      END IF
  625.      COLOR @X07
  626.      CLREOL
  627.      PRINT "@X0CMaximum of @X0F20@X0C Tagged Messages Reached @X0B- @X0FMessage not Tagged"
  628.      DELAY 54
  629.      PRINT CR
  630.      CLREOL
  631.      PRINT hold
  632.      max_tagged = TRUE
  633.    END IF
  634.    RETURN
  635.  
  636. ;***********************************************************************
  637. '
  638. ' This subroutine scans the screen at startup to see and fills an array called
  639. ' filenames() with the names of all files found on screen.  If RIPscrip is in
  640. ' use, it will also send out RIPscrip commands to define the location of the
  641. ' filenames on screen so that the caller can use a mouse to point and click.
  642. '
  643. ':scanforfiles
  644. 'IF (GRAFMODE() = "R") THEN
  645. '  rip = TRUE
  646. 'ENDIF
  647. '
  648. 'newy = 1
  649. 'WHILE (newy > 0) DO
  650. '  ' get a filename off the screen ... if a filename is found, the filename
  651. '  ' variable will be updated, if no more filenames are found, newy will be
  652. '  ' set to 0.
  653. '  SCRFILE newy, filename
  654. '
  655. '  IF (newy <> 0) THEN
  656. '    ' store the filename that was found into an array
  657. '    filenames(newy) = filename
  658. '
  659. '    ' If in RIPscrip mode, define the mouse region where the filename is
  660. '    ' located.  The coordinates are defined in X,Y coordinates of 0,newy and
  661. '    ' 13,newy+1.  The X coordinate (0 to 13) defines the length of the name.
  662. '    ' The Y coordinate (newy to newy+1) defines the height of the name.
  663. '    ' An 8x8 font is assumed.  The CHR(newy+128) is a "command" that we will
  664. '    ' be using to communicate back to FLAG.PPE the position of the file being
  665. '    ' selected via mouse click.
  666. '    IF (rip) THEN
  667. '      MOUSEREG 0,1,newy,13,newy+1,8,8,TRUE,FALSE," "+CHR(newy+128)
  668. '    ENDIF
  669. '    INC newy
  670. '  ENDIF
  671. 'ENDWHILE
  672. '
  673. '' finish up the mouse region definitions
  674. 'IF (rip) THEN
  675. '  MPRINT "!|#|#|#"+CR+chr(10)
  676. 'ENDIF
  677. 'RETURN
  678.